import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select


number='asd12345678'

# driver = webdriver.Chrome(r'D:\bianchengerbianchenger\driver\chromedriver.exe')
# driver.get('http://47.107.178.45/phpwind/')
# driver.maximize_window()
#
# driver.find_element(By.LINK_TEXT,"立即注册").click()
#
# driver.find_element(By.ID,'J_reg_username').send_keys(number)
# driver.find_element(By.ID,'J_reg_password').send_keys(number)
# driver.find_element(By.ID,'J_reg_repassword').send_keys(number)
# driver.find_element(By.ID,'J_reg_email').send_keys(number+'@qq.com')
#
# driver.find_element(By.CLASS_NAME,"btn.btn_big.btn_submit.mr20").click()
# time.sleep(2)
# driver.quit()


driver = webdriver.Chrome(r'D:\bianchengerbianchenger\driver\chromedriver.exe')
driver.get('http://47.107.178.45/phpwind/')

driver.maximize_window()

driver.find_element(By.ID,'J_username').send_keys(number)
driver.find_element(By.ID,'J_password').send_keys(number)

driver.find_element(By.CLASS_NAME,"btn.btn_big.btn_submit").click()

time.sleep(2)

driver.find_element(By.ID,"J_head_user_a").click()
driver.find_element(By.LINK_TEXT,"个人设置").click()
driver.find_element(By.LINK_TEXT,"工作经历").click()

driver.find_element(By.CLASS_NAME,"btn.btn_submit.fn.f12").click()

driver.find_element(By.ID,'J_work_company').send_keys('湖南科技大学')


# driver.find_element(By.XPATH,'//option[@value="2021"]')
s1 = Select(driver.find_element(By.ID, 'J_starty'))
s1.select_by_value('2016')
s2 = Select(driver.find_element(By.ID, 'J_startm'))
s2.select_by_value('7')
s3 = Select(driver.find_element(By.ID, 'J_endy'))
s3.select_by_value('2016')
s4 = Select(driver.find_element(By.ID, 'J_endm'))
s4.select_by_value('9')

driver.find_element(By.CLASS_NAME,"btn.btn_submit.mr5").click()